import { service } from '@/utils/request'


export async function pageList(page, size) {
    return await service({
        url: `/api//roles/` + page + '/' + size,
        method: 'get',
        // data
    })
}

export async function allList(page, size) {
    return await service({
        url: `/api//roles`,
        method: 'get',
        // data
    })
}

export async function remove(id) {
    return await service({
        url: `/roles/` + id,
        method: 'delete'
    })
}

export async function update(id, data) {
    return await service({
        url: `/roles/` + id,
        method: 'put',
        data
    })
}


export async function add(data) {
    return await service({
        url: `/roles`,
        method: 'post',
        data
    })
}

export async function permissions(page, size) {
    return await service({
        url: `/roles/permissions`,
        method: 'get',
        // data
    })

}